-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: multiplication of intervals in rings #20636
base: master
Are you sure you want to change the base?
Conversation
eric-wieser
commented
Jan 10, 2025
PR summary ad349f59d1Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
instance instMulOfSemiring : Mul (NonemptyInterval α) where | ||
mul a b := | ||
{ fst := a.fst * b.fst ⊓ a.fst * b.snd ⊓ a.snd * b.fst ⊓ a.snd * b.snd | ||
snd := a.fst * b.fst ⊔ a.fst * b.snd ⊔ a.snd * b.fst ⊔ a.snd * b.snd | ||
fst_le_snd := by | ||
dsimp | ||
apply inf_le_sup.trans ?_ | ||
gcongr | ||
apply inf_le_sup.trans ?_ | ||
gcongr | ||
apply inf_le_sup.trans ?_ | ||
rfl } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generalises the existing multiplication, right? Maybe we can merge both instances
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only under certain assumptions. Right now I don't think either satisfies the requirements of the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? The existing one has [MulLeftMono α] [MulRightMono α]
, which implies a.fst * b.fst ⊓ a.fst * b.snd ⊓ a.snd * b.fst ⊓ a.snd * b.snd = a.fst * b.fst ⊓ a.snd * b.snd
and similarly for ⊔